<form action="" class="form-horizontal" role="form">
	<div class="form-group">
	    <label class="col-sm-2 control-label">版权声明</label>
	    <div class="col-sm-4">
	      <input type="text" class="form-control" name="copyright" placeholder="" datatype="*2-20" value="{$config['copyright']}">
	    </div>
	</div>
	<div class="form-group">
	    <label class="col-sm-2 control-label">Logo图片</label>
	    <div class="col-sm-5">
			<div class="logo-privew" id="logo-privew"><img src="{$config['logo']}" /></div>
			<input type="text" id="logo" name="logo" class="form-control margin-bottom" value="{$config['logo']}"/>
			<input type="file" name="file_upload" id="image_upload" />
	    </div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label">联系方式</label>
		<div class="col-sm-3">
			<input type="text" class="form-control" name="contact" placeholder="" datatype="phone" value="{$config['contact']}"/>
		</div>
	</div>
	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-8">
			<input type="hidden" name="id" value="{$config['id']}" />
			<button type="submit" class="btn btn-primary submit" data-loading-txt="提交中，请稍后……" data-ajax-url="__CONTROLLER__/indexPost">保存更改</button>
		</div>
	</div>
</form>
<style class="logo-privew"> 
	.logo-privew{ width:100px; height:50px; max-height:100px; overflow:hidden; margin-bottom:10px;} 
	.logo-privew img{width:100px;}
</style>	

<link rel="stylesheet" href="__PUBLIC__/Style/Common/uploadify/uploadify.css">
<script type="text/javascript" src="__PUBLIC__/Style/Common/uploadify/jquery.uploadify.min.js?{:rand(0,9999)}"></script>
<script>
$(function() {
    $("#image_upload").uploadify({
        'multi'			:	false,
        'fileSizeLimit' : 	'200kb',
        'buttonText'	:	'选择图片',
        'fileTypeDesc' 	: 	'Image Files',
        'fileTypeExts' 	: 	'*.jpg; *.png',
        'swf'              :   '__PUBLIC__/Style/Common/uploadify/uploadify.swf',
        'uploader'         :   '__MODULE__/Upload/uploadOne',
        'onUploadSuccess'	: function(data, res){
        	
        	var url = eval("(" + res + ")").extra.url;
        	$("#logo-privew img").attr("src", url);
        	$("#logo").val( url );
        	
        }
    });
});
</script>